package com.xx.service.impl;

import com.xx.service.BookService;
import org.springframework.stereotype.Service;

import java.util.logging.Logger;

@Service
public class BookServiceImpl implements BookService {
    private static final Logger logger = Logger.getLogger(BookServiceImpl.class.getName());

    @Override
    public void addBook(String bookName, String author, double price) throws InterruptedException {
        System.out.println("实现书籍保存");
    }

    @Override
    public void updateBookById(String bookName, String author, double price, int id) throws InterruptedException {
        //        System.out.println("开始时间: "+System.currentTimeMillis());
//
//        //格式化 %s:String %d:int %2f:double
//        System.out.format("调用成功addBook，" +
//                        "bookName=%s,author=%s,price=%.2f,BookId=%d%n",
//                bookName, author, price);
//        try{
//            Thread.sleep(1000);
//        }catch (InterruptedException e){
//            throw new RuntimeException(e);
//        }

        System.out.println("实现书籍修改方法");
    }
}
